home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
tools
/
developer-tools
/
andere sprachen
/
gamesmaster
/
demosrc
/
agacolourlist.s
next >
Wrap
Text File
|
1996-07-16
|
6KB
|
167 lines
;AGA ColourList
;--------------
;Displays an AGA colourlist (24bit colour lines). To do this we use a
;raster command specially reserved for colourlists (COL24LIST).
;Colourlists enable you to have many more colours than would normally be
;allowed -- even though only 1 bitplane is active, we have 256 colours
;on screen. Now lets see a PC do that :-)
;
;To exit the demo, press the left mouse button.
opt o+
INCLUDE "exec/exec_lib.i"
INCLUDE "games/games.i
INCLUDE "games/games_lib.i"
CALL MACRO
jsr _LVO\1(a6)
ENDM
SECTION "AGA_ColourList",CODE
;===========================================================================;
; INITIALISE DEMO
;===========================================================================;
Start: MOVEM.L A0-A6/D1-D7,-(SP)
move.l ($4).w,a6
lea GMS_Name(pc),a1
moveq #$00,d0
CALL OpenLibrary
move.l d0,GMS_Base
beq.s Quit
move.l GMS_Base(pc),a6 ;Set task to user priority.
CALL SetUserPri
lea ScreenStruct(pc),a0 ;Initialise our screen structure.
CALL Add_Screen
tst.l d0
bne.s Error
lea ScreenStruct(pc),a0 ;Now show the screen.
CALL Show_Screen
;===========================================================================;
; MAIN LOOP
;===========================================================================;
CALL Wait_LMB
;===========================================================================;
; RETURN TO DOS
;===========================================================================;
CALL Delete_Screen ;Give back screen memory etc.
Error move.l GMS_Base(pc),a1
move.l ($4).w,a6
CALL CloseLibrary
Quit MOVEM.L (SP)+,A0-A6/D1-D7
moveq #$00,d0
rts
;===========================================================================;
; DATA
;===========================================================================;
GMS_Name:
dc.b "games.library",0
even
GMS_Base:
dc.l 0
AMT_PLANES = 1
ScreenStruct:
dc.l "GSV1" ;Structure version.
dc.l 0,0,0 ;Screen_Mem1/2/3
dc.l 0 ;Screen link.
dc.l 0 ;Address of screen palette
dc.l RasterList ;Address of rasterlist
dc.l 0 ;Amt of colours in screen palette.
dc.w 256,320,320/8 ;Screen Height, Width, Width/8
dc.w 256,320,320/8 ;Pic Height, Width, Width/8
dc.w AMT_PLANES ;Amt_Planes
dc.w 0,0 ;Top Of Screen, X/Y
dc.w 0 ;Scroll buffer in pixels/8.
dc.w 0,0 ;X/Y counterx (for scrolling).
dc.l NOBURST|BLKBDR ;Special attributes.
dc.w LORES|_24BITCOL ;Screen mode.
dc.b INTERLEAVED ;Screen type
dc.b 0 ;Screen Is Being Displayed?
dc.l 0,0 ;Reserved area.
even
RasterList:
COL24LIST 000,1,00,Colours ;Line, Skip, Colnum, ColourList.
RASTEND
Colours:
dc.l $010000,$020000,$030000,$040000
dc.l $050000,$060000,$070000,$080000
dc.l $090000,$0a0000,$0b0000,$0c0000
dc.l $0d0000,$0e0000,$0f0000,$100000
dc.l $110000,$120000,$130000,$140000
dc.l $150000,$160000,$170000,$180000
dc.l $190000,$1a0000,$1b0000,$1c0000
dc.l $1d0000,$1e0000,$1f0000,$200000
dc.l $210000,$220000,$230000,$240000
dc.l $250000,$260000,$270000,$280000
dc.l $290000,$2a0000,$2b0000,$2c0000
dc.l $2d0000,$2e0000,$2f0000,$300000
dc.l $310000,$320000,$330000,$340000
dc.l $350000,$360000,$370000,$380000
dc.l $390000,$3a0000,$3b0000,$3c0000
dc.l $3d0000,$3e0000,$3f0000,$400000
dc.l $410000,$420000,$430000,$440000
dc.l $450000,$460000,$470000,$480000
dc.l $490000,$4a0000,$4b0000,$4c0000
dc.l $4d0000,$4e0000,$4f0000,$500000
dc.l $510000,$520000,$530000,$540000
dc.l $550000,$560000,$570000,$580000
dc.l $590000,$5a0000,$5b0000,$5c0000
dc.l $5d0000,$5e0000,$5f0000,$600000
dc.l $610000,$620000,$630000,$640000
dc.l $650000,$660000,$670000,$680000
dc.l $690000,$6a0000,$6b0000,$6c0000
dc.l $6d0000,$6e0000,$6f0000,$700000
dc.l $710000,$720000,$730000,$740000
dc.l $750000,$760000,$770000,$780000
dc.l $790000,$7a0000,$7b0000,$7c0000
dc.l $7d0000,$7e0000,$7f0000,$800000
dc.l $810000,$820000,$830000,$840000
dc.l $850000,$860000,$870000,$880000
dc.l $890000,$8a0000,$8b0000,$8c0000
dc.l $8d0000,$8e0000,$8f0000,$900000
dc.l $910000,$920000,$930000,$940000
dc.l $950000,$960000,$970000,$980000
dc.l $990000,$9a0000,$9b0000,$9c0000
dc.l $9d0000,$9e0000,$9f0000,$a00000
dc.l $a10000,$a20000,$a30000,$a40000
dc.l $a50000,$a60000,$a70000,$a80000
dc.l $a90000,$aa0000,$ab0000,$ac0000
dc.l $ad0000,$ae0000,$af0000,$b00000
dc.l $b10000,$b20000,$b30000,$b40000
dc.l $b50000,$b60000,$b70000,$b80000
dc.l $b90000,$ba0000,$bb0000,$bc0000
dc.l $bd0000,$be0000,$bf0000,$c00000
dc.l $c10000,$c20000,$c30000,$c40000
dc.l $c50000,$c60000,$c70000,$c80000
dc.l $c90000,$ca0000,$cb0000,$cc0000
dc.l $cd0000,$ce0000,$cf0000,$d00000
dc.l $d10000,$d20000,$d30000,$d40000
dc.l $d50000,$d60000,$d70000,$d80000
dc.l $d90000,$da0000,$db0000,$dc0000
dc.l $dd0000,$de0000,$df0000,$e00000
dc.l $e10000,$e20000,$e30000,$e40000
dc.l $e50000,$e60000,$e70000,$e80000
dc.l $e90000,$ea0000,$eb0000,$ec0000
dc.l $ed0000,$ee0000,$ef0000,$f00000
dc.l $f10000,$f20000,$f30000,$f40000
dc.l $f50000,$f60000,$f70000,$f80000
dc.l $f90000,$fa0000,$fb0000,$fc0000
dc.l $fd0000,$fe0000,$ff0000
dc.l -1